﻿@model SmartAnalytics.Services.Util.PagedResult<SmartAnalytics.Services.Models.UserManagePageItem>
@{
    ViewBag.Title = "用户管理";
}

<div class="row">

    <div class="col-md-3">
        @Html.Partial("Shared/_QuickMenu")
    </div>

    <div class="col-md-9 ">

        <ol class="breadcrumb">
            <li><a href="/">管理后台</a></li>
            <li><a href="/UserManage">用户管理</a></li>
            <li class="active">
                <label class="label label-success">共查询到 @Model.SizeCount 条信息</label>
            </li>
        </ol>
        @*
    <form action="/Test/Query" method="POST">
        <div class="callout callout-info">
            <table>
                <tr style="line-height: 42px;">
                    <td style="padding: 0 5px;">开始时间：</td>
                    <td style="padding: 0 5px;"><input type="text" class="form-control" name="StartTime"></td>
                    <td style="padding: 0 5px;">结束时间：</td>
                    <td style="padding: 0 5px;"><input type="text" class="form-control" name="EndTime"></td>
                </tr>
                <tr style="line-height: 42px;">
                    <td style="padding: 0 5px;">用户账号：</td>
                    <td style="padding: 0 5px;"><input type="text" class="form-control"></td>
                    <td style="padding: 0 5px;">用户角色：</td>
                    <td style="padding: 0 5px;"><input type="text" class="form-control"></td>
                </tr>
            </table>
        </div>

        <div class="callout callout-primary">
            <div class="btn-group">
                <button type="submit" class="btn btn-default btn-group-lg" name="Event" value="Query">查询</button>
                <button type="submit" class="btn btn-default btn-group-lg" name="Event" value="Create">添加</button>
                <button type="submit" class="btn btn-default btn-group-lg">修改</button>
                <button type="submit" class="btn btn-default btn-group-lg">删除</button>
                <button type="submit" class="btn btn-default btn-group-lg">导出</button>
                <button type="submit" class="btn btn-default btn-group-lg">导入</button>
                <button type="submit" class="btn btn-default btn-group-lg">打印</button>
            </div>
        </div>

    </form>
        *@
        <table class="table table-hover table-striped">
            <thead>
                <tr>
                    <th>序号</th>
                    <th>邮箱地址</th>
                    <th>真实姓名</th>
                    <th>账号状态</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                @for (var i = 0; i < Model.Result.Count; i++)
                {
                    <tr>
                        <td>@(i + 1)</td>
                        <td>@Model.Result[i].UserName </td>
                        <td>@Model.Result[i].Nick </td>
                        <td>@Html.Raw(Model.Result[i].IsEnable ? "正常" : "<span class='label label-danger'>禁用</span>")</td>
                        <td>@Model.Result[i].CreateTime </td>
                        <td>
                            <a class="btn btn-danger delete" data-id="@Model.Result[i].UserName" href="/UserManage/delete?username=@Model.Result[i].UserName">删除</a>
                        </td>
                    </tr>
                }
            </tbody>
        </table>

        @Html.Partial("_PartialPagingInfo")

    </div>
</div>
